package cn.chinaflame.pagodas.entity;
import javax.persistence.*;
import java.util.Objects;

/**
 * @author created by lbq
 * @date 2018年1月4日 下午2:31:09
 **/
@Entity
@Table(name = "pa_product_position", schema = "pagoda", catalog = "")
public class PaProductPosition {
    private String id;
    private String name;
    private String positionNo;
    private String areaId;
    private String cameraIp;
    private String state;
    private String createtime;
    private String updatetime;
	private String deviceType;
	private String deviceSort;
	private String sumlights;
	
	@Column(name = "sumlights")
	 public String getSumlights() {
		return sumlights;
	}

	public void setSumlights(String sumlights) {
		this.sumlights = sumlights;
	}

	@Column(name = "device_type", nullable = true, length = 200)
    public String getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(String deviceType) {
		this.deviceType = deviceType;
	}
	@Column(name = "device_sort", nullable = true, length = 200)
	public String getDeviceSort() {
		return deviceSort;
	}

	public void setDeviceSort(String deviceSort) {
		this.deviceSort = deviceSort;
	}

    @Id
    @Column(name = "id", nullable = false, length = 20)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "state", nullable = true, length = 1)
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 30)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Basic
    @Column(name = "position_no", nullable = true, length = 20)
    public String getPositionNo() {
        return positionNo;
    }

    public void setPositionNo(String positionNo) {
        this.positionNo = positionNo;
    }

    @Basic
    @Column(name = "area_id", nullable = true, length = 20)
    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    @Basic
    @Column(name = "camera_ip", nullable = true, length = 15)
    public String getCameraIp() {
        return cameraIp;
    }

    public void setCameraIp(String cameraIp) {
        this.cameraIp = cameraIp;
    }

    @Basic
    @Column(name = "createtime", nullable = true)
    public String getCreatetime() {
        return createtime;
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    @Basic
    @Column(name = "updatetime", nullable = true)
    public String getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(String updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PaProductPosition that = (PaProductPosition) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(name, that.name) &&
                Objects.equals(areaId, that.areaId) &&
                Objects.equals(createtime, that.createtime) &&
                Objects.equals(updatetime, that.updatetime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, name, areaId, createtime, updatetime);
    }
}
